<?php

namespace App\Http\Controllers;

use DB;
use Storage;
use Session;
use Illuminate\Http\Request;
use Laravel\Lumen\Routing\Controller;


class CategoryController  extends BaseController
{
     /**
     * @api {get} /invitation GetModel
     *
     * @apiVersion 0.1.0
     *
     * @apiName GetModel
     *
     * @apiGroup invitation
     *
     * @apiPermission app
     *
     *
     * @apiSuccess {Boolean} error       是否错误.
     *
     * @apiSuccess {Object} result       分类数据.
     *
     * @apiSuccess {int} id              分类id.
     *
     * @apiSuccess {String} name         分类名称.
     *
     * @apiError paramError 参数错误.
     *
     * @apiSampleRequest http://192.168.1.120:82/api/team
     *
     */

	public function index()
	{
		 $result = DB::table("category")
          ->select("id","name")
          ->where("is_delete",0)
          ->get();
          return $this->jsonResponse(false,$result);
	}

	public function show($id)
	{
		# code...
	}

	public function store()
	{
		# code...
	}

	public function update($id)
	{
		# code...
	}

	public function destory($id)
	{
		# code...
	}
}